namespace KPIS.GERP.Models.Migrations
{
    using System;
    using System.Data.Entity.Migrations;
    
    public partial class update0050 : DbMigration
    {
        public override void Up()
        {
            AlterColumn("dbo.IcmInventoryStockTaking", "ResourceTypeId", c => c.Int(nullable: false));
            AddForeignKey("dbo.IcmInventoryStockTaking", "ResourceTypeId", "dbo.IcmMasResourceType", "ResTypeId", cascadeDelete: true);
            CreateIndex("dbo.IcmInventoryStockTaking", "ResourceTypeId");
        }
        
        public override void Down()
        {
            DropIndex("dbo.IcmInventoryStockTaking", new[] { "ResourceTypeId" });
            DropForeignKey("dbo.IcmInventoryStockTaking", "ResourceTypeId", "dbo.IcmMasResourceType");
            AlterColumn("dbo.IcmInventoryStockTaking", "ResourceTypeId", c => c.Int());
        }
    }
}
